On Silicon Graphics systems that support EISA, if a bus master asserts LOCK*, some additional constraints apply to how long the bus master can hold the lock. Your locks should work correctly as long as your usage conforms to the read-modify-write paradigm used by the CPU programmatic interface. The following routines, which are also supported for VME device drivers, provide atomic and/or operations: they find the appropriate-sized mask by reading the PIO address, then they rewrite, modified by the mask value m.
void pio_orb_rmw(piomap_t* pio, iopaddr_t io, uchar m) void pio_orh_rmw(piomap_t* pio, iopaddr_t io, ushort m) void pio_orw_rmw(piomap_t* pio, iopaddr_t io, uint m) void pio_andb_rmw(piomap_t* pio, iopaddr_t io, uchar m) void pio_andh_rmw(piomap_t* pio, iopaddr_t io, ushort m) void pio_andw_rmw(piomap_t* pio, iopaddr_t io, uint m)